#define _CRT_SECURE_NO_WARNINGS 1


#include<vector>
#include<iostream>

using namespace std;

vector<int> twoSum(vector<int>& nums, int target)
{
    vector<int> v;
    for (int i = 0; i < nums.size(); i++)
    {
        for (int j = i + 1; j < nums.size(); j++)
        {
            if (nums[i] + nums[j] == target)
            {
                v.push_back(i);
                v.push_back(j);
                return v;
            }
        }
    }
    return v;
}


int main()
{
    vector<int> v = { 2,7,11,15 };
    vector<int> ret = twoSum(v, 9);
    for (auto& e : ret)
    {
        cout << e << ' ';
    }
    cout << endl;

	return 0;
}